package com.ckx.动物;

public class Dog extends Animal implements ISwimming,IRunning{
    public Dog(String name,int age){
        super(name,age);
    }

    public void eat() {
        System.out.println(this.name+"正在吃狗粮");
    }
    public void bark(){
        System.out.println(this.name+"正在汪汪汪");
    }
    public void run(){
        System.out.println(this.name+"正在跑");
    }
    public void swim(){
        System.out.println(this.name+"正在游泳");
    }
    public boolean equals(Object object){
        Dog tmp =(Dog)object;
        return tmp.name.equals(this.name)
                &&tmp.age==this.age;
    }
}
